# -*- coding: utf-8 -*-
import logging
import logging.config
import logmod.LogMgr

#logging.config.fileConfig("logging.conf")    # 采用配置文件

logging.getLogger("db.simpleExample").setLevel(logging.DEBUG)
# create logger
logger = logging.getLogger("db.simpleExample")

# "application" code
logger.debug("debug message")
logger.info("info message")
logger.warn("warn message")
logger.error("error message")
logger.critical("critical message")

logger2 = logmod.LogMgr.getLogger("test")
logger2.setLevel(logging.DEBUG)
logger2.debug("debug message")
logger2.info("info message")
logger2.warn("warn message")
logger2.error("error message")
logger2.critical("critical message")

logger3 = logmod.LogMgr.getLogger("db.test")
logger3.setLevel(logging.DEBUG)
dict = [1, 2]
logger3.debug("debug message %s", dict)